<template>
  <div>
    <el-row>
      <el-col :span="24">
        <div class="addccc">
          <el-button type="primary">添加</el-button>
        </div>
      </el-col>
      <el-col :span="24">
        <el-table :data="tableData" border style="width: 100%">
          <el-table-column prop="date" label="" width="80" align="center">
          </el-table-column>
          <el-table-column prop="name" label="名字" width="180" align="center">
          </el-table-column>
          <el-table-column prop="address" label="简介" align="center">
          </el-table-column>
          <el-table-column
            prop="address1"
            label="跳转地址"
            align="center"
            width="200"
          >
          </el-table-column>
          <el-table-column
            prop="address2"
            label="Logo"
            width="200"
            align="center"
          >
          </el-table-column>

          <el-table-column label="操作" width="180" align="center">
            <template #default="scope">
              <el-button
                size="mini"
                @click="handleEdit(scope.$index, scope.row)"
                >编辑</el-button
              >
              <el-button
                size="mini"
                type="danger"
                @click="handleDelete(scope.$index, scope.row)"
                >删除</el-button
              >
            </template>
          </el-table-column>
        </el-table>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: "upload",
  data() {
    return {
      tableData: [
        {
          date: "1",
          name: "CSIC",
          address: "中船重工，中国船舶行业唯一一家世界500强企业。",
          address1: "http://www.csic.com.cn",
          address2: "",
        },
      ],
    };
  },
  components: {},
  methods: {
    handleEdit(index, row) {
      console.log(index, row);
    },
    handleDelete(index, row) {
      console.log(index, row);
    },
  },
};
</script>

<style scoped>
.addccc {
  margin-bottom: 20px;
}
</style>